#include <libspopc.h>
#include <string.h> /* use of strcpy() */
#include <stdio.h> /* use of printf() */
#include <stdlib.h> /* use of exit() */
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include "Correo.h"

int main(){

	popsession* mysession;

	Correo* correito = new Correo();

	libspopc_init();

	if(popbegin("pop.gmail.com:995", "datos.2c2010@gmail.com", "75067506", &mysession)==NULL){

	int last,total,i;
	last = mysession->last;
	total = mysession->num;

/*
		for(i=1;i<=last;i++){

			printf("%s",popgetmsg(mysession,i));

		}
*/

	correito->mensaje = popgetmsg(mysession,1);

	printf("%s",correito->mensaje);

	}

	popend(mysession);

	return 0;
}
